#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QLabel>
#include <QMainWindow>
#include <QGraphicsScene>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

protected:
    void resizeEvent(QResizeEvent *event) override;

private:
    Ui::MainWindow *ui;

private:
    QLabel *labViewCord;
    QLabel *labSceneCord;
    QLabel *labItemCord;
    QGraphicsScene *scene;

    static const int ItemId = 1;
    static const int ItemDescription = 2;
    int seqNum = 0;

private:
    void initGraphics();

private slots:
    void on_mouseMovePoint(QPoint point);
    void on_mouseClicked(QPoint point);
    void on_mouseDoubleClicked(QPoint point);
    void on_keyPress(QKeyEvent *event);

    void on_actZoomIn_triggered();
    void on_actZoomOut_triggered();
    void on_actRestore_triggered();
    void on_actLeftRolate_triggered();
    void on_actRightRolate_triggered();
    void on_actEditFront_triggered();
    void on_actEditBack_triggered();
    void on_actGroup_triggered();
    void on_actGroupBreak_triggered();
    void on_actRect_triggered();
    void on_actEllipse_triggered();
    void on_actCircle_triggered();
    void on_actLine_triggered();
    void on_actPolygon_triggered();
    void on_actTriangle_triggered();
    void on_actText_triggered();
};
#endif // MAINWINDOW_H
